<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: src/include/lwip/apps/mdns_domain.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.2.0</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('mdns__domain_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">mdns_domain.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="mdns__opts_8h.html">lwip/apps/mdns_opts.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="mdns__priv_8h.html">lwip/apps/mdns_priv.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a17db69fa887515374452b945e959bbf9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a17db69fa887515374452b945e959bbf9">mdns_domain_add_label</a> (struct mdns_domain *domain, const char *label, u8_t len)</td></tr>
<tr class="separator:a17db69fa887515374452b945e959bbf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a642449cbf0074f1a2504e72158e75859"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a642449cbf0074f1a2504e72158e75859">mdns_domain_add_domain</a> (struct mdns_domain *domain, struct mdns_domain *source)</td></tr>
<tr class="separator:a642449cbf0074f1a2504e72158e75859"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af228d1cf8d779c714a016702db095db6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#af228d1cf8d779c714a016702db095db6">mdns_domain_add_string</a> (struct mdns_domain *domain, const char *source)</td></tr>
<tr class="separator:af228d1cf8d779c714a016702db095db6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5f49d9356a76879e0e6a14eb0643b23"><td class="memItemLeft" align="right" valign="top">u16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#ab5f49d9356a76879e0e6a14eb0643b23">mdns_readname</a> (struct <a class="el" href="structpbuf.html">pbuf</a> *p, u16_t offset, struct mdns_domain *domain)</td></tr>
<tr class="separator:ab5f49d9356a76879e0e6a14eb0643b23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0aff096695eebacb2668d2762722860c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a0aff096695eebacb2668d2762722860c">mdns_domain_debug_print</a> (struct mdns_domain *domain)</td></tr>
<tr class="separator:a0aff096695eebacb2668d2762722860c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52d8f70432ae998814f16b18431213cd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a52d8f70432ae998814f16b18431213cd">mdns_domain_eq</a> (struct mdns_domain *a, struct mdns_domain *b)</td></tr>
<tr class="separator:a52d8f70432ae998814f16b18431213cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2d8951e2435f93fdc889f6a71e0c8a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#ac2d8951e2435f93fdc889f6a71e0c8a6">mdns_build_reverse_v4_domain</a> (struct mdns_domain *domain, const <a class="el" href="ip4__addr_8h.html#a3d3b45daffbc15d65da236e31e621b7e">ip4_addr_t</a> *addr)</td></tr>
<tr class="separator:ac2d8951e2435f93fdc889f6a71e0c8a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cde39039e0e1e21b4851d840d733926"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a9cde39039e0e1e21b4851d840d733926">mdns_build_reverse_v6_domain</a> (struct mdns_domain *domain, const <a class="el" href="ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762">ip6_addr_t</a> *addr)</td></tr>
<tr class="separator:a9cde39039e0e1e21b4851d840d733926"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a191d9b70a66083f40aaa022c2ed88b12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a191d9b70a66083f40aaa022c2ed88b12">mdns_build_host_domain</a> (struct mdns_domain *domain, struct <a class="el" href="structmdns__host.html">mdns_host</a> *mdns)</td></tr>
<tr class="separator:a191d9b70a66083f40aaa022c2ed88b12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7485d75976b73354668a5a54bc8658ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a7485d75976b73354668a5a54bc8658ed">mdns_build_dnssd_domain</a> (struct mdns_domain *domain)</td></tr>
<tr class="separator:a7485d75976b73354668a5a54bc8658ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29ddb0a6ba0edcf34104ec1f6322968b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a29ddb0a6ba0edcf34104ec1f6322968b">mdns_build_service_domain</a> (struct mdns_domain *domain, struct <a class="el" href="structmdns__service.html">mdns_service</a> *service, int include_name)</td></tr>
<tr class="separator:a29ddb0a6ba0edcf34104ec1f6322968b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7221cb1a83ed6dcfb3a2b1365154b43d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a7221cb1a83ed6dcfb3a2b1365154b43d">mdns_build_request_domain</a> (struct mdns_domain *domain, struct <a class="el" href="structmdns__request.html">mdns_request</a> *request, int include_name)</td></tr>
<tr class="separator:a7221cb1a83ed6dcfb3a2b1365154b43d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab72e48cf076afd1e3a08030d1d0bff9e"><td class="memItemLeft" align="right" valign="top">u16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#ab72e48cf076afd1e3a08030d1d0bff9e">mdns_compress_domain</a> (struct <a class="el" href="structpbuf.html">pbuf</a> *<a class="el" href="structpbuf.html">pbuf</a>, u16_t *offset, struct mdns_domain *domain)</td></tr>
<tr class="separator:ab72e48cf076afd1e3a08030d1d0bff9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92de54d2f384a4e4ffa85e529cc05411"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__domain_8h.html#a92de54d2f384a4e4ffa85e529cc05411">mdns_write_domain</a> (struct <a class="el" href="structmdns__outpacket.html">mdns_outpacket</a> *outpkt, struct mdns_domain *domain)</td></tr>
<tr class="separator:a92de54d2f384a4e4ffa85e529cc05411"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>MDNS responder - domain related functionalities </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a7485d75976b73354668a5a54bc8658ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7485d75976b73354668a5a54bc8658ed">&#9670;&nbsp;</a></span>mdns_build_dnssd_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_build_dnssd_domain </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Build the lookup-all-services special DNS-SD domain name </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>Where to write the domain name </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if domain _services._dns-sd._udp.local. was written, an err_t otherwise </dd></dl>

</div>
</div>
<a id="a191d9b70a66083f40aaa022c2ed88b12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a191d9b70a66083f40aaa022c2ed88b12">&#9670;&nbsp;</a></span>mdns_build_host_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_build_host_domain </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmdns__host.html">mdns_host</a> *&#160;</td>
          <td class="paramname"><em>mdns</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Build the &lt;hostname&gt;.local. domain name </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>Where to write the domain name </td></tr>
    <tr><td class="paramname">mdns</td><td>TMDNS netif descriptor. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if domain &lt;hostname&gt;.local. was written, an err_t otherwise </dd></dl>

</div>
</div>
<a id="a7221cb1a83ed6dcfb3a2b1365154b43d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7221cb1a83ed6dcfb3a2b1365154b43d">&#9670;&nbsp;</a></span>mdns_build_request_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_build_request_domain </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmdns__request.html">mdns_request</a> *&#160;</td>
          <td class="paramname"><em>request</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>include_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Build domain name for a request </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>Where to write the domain name </td></tr>
    <tr><td class="paramname">request</td><td>The request struct, containing service name, type and protocol </td></tr>
    <tr><td class="paramname">include_name</td><td>Whether to include the service name in the domain </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if domain was written. If service name is included, &lt;name&gt;.&lt;type&gt;.&lt;proto&gt;.local. will be written, otherwise &lt;type&gt;.&lt;proto&gt;.local. An err_t is returned on error. </dd></dl>

</div>
</div>
<a id="ac2d8951e2435f93fdc889f6a71e0c8a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2d8951e2435f93fdc889f6a71e0c8a6">&#9670;&nbsp;</a></span>mdns_build_reverse_v4_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_build_reverse_v4_domain </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="ip4__addr_8h.html#a3d3b45daffbc15d65da236e31e621b7e">ip4_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Build domain for reverse lookup of IPv4 address like 12.0.168.192.in-addr.arpa. for 192.168.0.12 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>Where to write the domain name </td></tr>
    <tr><td class="paramname">addr</td><td>Pointer to an IPv4 address to encode </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if domain was written, an err_t otherwise </dd></dl>

</div>
</div>
<a id="a9cde39039e0e1e21b4851d840d733926"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9cde39039e0e1e21b4851d840d733926">&#9670;&nbsp;</a></span>mdns_build_reverse_v6_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_build_reverse_v6_domain </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762">ip6_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Build domain for reverse lookup of IP address like b.a.9.8.7.6.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. for 2001:db8::567:89ab </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>Where to write the domain name </td></tr>
    <tr><td class="paramname">addr</td><td>Pointer to an IPv6 address to encode </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if domain was written, an err_t otherwise </dd></dl>

</div>
</div>
<a id="a29ddb0a6ba0edcf34104ec1f6322968b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29ddb0a6ba0edcf34104ec1f6322968b">&#9670;&nbsp;</a></span>mdns_build_service_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_build_service_domain </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmdns__service.html">mdns_service</a> *&#160;</td>
          <td class="paramname"><em>service</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>include_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Build domain name for a service </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>Where to write the domain name </td></tr>
    <tr><td class="paramname">service</td><td>The service struct, containing service name, type and protocol </td></tr>
    <tr><td class="paramname">include_name</td><td>Whether to include the service name in the domain </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if domain was written. If service name is included, &lt;name&gt;.&lt;type&gt;.&lt;proto&gt;.local. will be written, otherwise &lt;type&gt;.&lt;proto&gt;.local. An err_t is returned on error. </dd></dl>

</div>
</div>
<a id="ab72e48cf076afd1e3a08030d1d0bff9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab72e48cf076afd1e3a08030d1d0bff9e">&#9670;&nbsp;</a></span>mdns_compress_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16_t mdns_compress_domain </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structpbuf.html">pbuf</a> *&#160;</td>
          <td class="paramname"><em>pbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t *&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return bytes needed to write before jump for best result of compressing supplied domain against domain in outpacket starting at specified offset. If a match is found, offset is updated to where to jump to </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pbuf</td><td>Pointer to pbuf with the partially constructed DNS packet </td></tr>
    <tr><td class="paramname">offset</td><td>Start position of a domain written earlier. If this location is suitable for compression, the pointer is updated to where in the domain to jump to. </td></tr>
    <tr><td class="paramname">domain</td><td>The domain to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes to write of the new domain before writing a jump to the offset. If compression can not be done against this previous domain name, the full new domain length is returned. </dd></dl>

</div>
</div>
<a id="a642449cbf0074f1a2504e72158e75859"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a642449cbf0074f1a2504e72158e75859">&#9670;&nbsp;</a></span>mdns_domain_add_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_domain_add_domain </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>source</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a partial domain to a domain </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>The domain to add a label to </td></tr>
    <tr><td class="paramname">source</td><td>The domain to add, like &lt;\x09_services\007_dns-sd\000&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK on success, an err_t otherwise if label too long </dd></dl>

</div>
</div>
<a id="a17db69fa887515374452b945e959bbf9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17db69fa887515374452b945e959bbf9">&#9670;&nbsp;</a></span>mdns_domain_add_label()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_domain_add_label </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a label part to a domain </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>The domain to add a label to </td></tr>
    <tr><td class="paramname">label</td><td>The label to add, like &lt;hostname&gt;, 'local', 'com' or '' </td></tr>
    <tr><td class="paramname">len</td><td>The length of the label </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK on success, an err_t otherwise if label too long </dd></dl>

</div>
</div>
<a id="af228d1cf8d779c714a016702db095db6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af228d1cf8d779c714a016702db095db6">&#9670;&nbsp;</a></span>mdns_domain_add_string()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_domain_add_string </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a string domain to a domain </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>The domain to add a label to </td></tr>
    <tr><td class="paramname">source</td><td>The string to add, like &lt;_services._dns-sd&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK on success, an err_t otherwise if label too long </dd></dl>

</div>
</div>
<a id="a0aff096695eebacb2668d2762722860c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0aff096695eebacb2668d2762722860c">&#9670;&nbsp;</a></span>mdns_domain_debug_print()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mdns_domain_debug_print </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Print domain name to debug output </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>The domain name </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a52d8f70432ae998814f16b18431213cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52d8f70432ae998814f16b18431213cd">&#9670;&nbsp;</a></span>mdns_domain_eq()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mdns_domain_eq </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return 1 if contents of domains match (case-insensitive) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>Domain name to compare 1 </td></tr>
    <tr><td class="paramname">b</td><td>Domain name to compare 2 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if domains are equal ignoring case, 0 otherwise </dd></dl>

</div>
</div>
<a id="ab5f49d9356a76879e0e6a14eb0643b23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5f49d9356a76879e0e6a14eb0643b23">&#9670;&nbsp;</a></span>mdns_readname()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16_t mdns_readname </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structpbuf.html">pbuf</a> *&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read possibly compressed domain name from packet buffer </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p</td><td>The packet </td></tr>
    <tr><td class="paramname">offset</td><td>start position of domain name in packet </td></tr>
    <tr><td class="paramname">domain</td><td>The domain name destination </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new offset after the domain, or MDNS_READNAME_ERROR if reading failed </dd></dl>

</div>
</div>
<a id="a92de54d2f384a4e4ffa85e529cc05411"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92de54d2f384a4e4ffa85e529cc05411">&#9670;&nbsp;</a></span>mdns_write_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_write_domain </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmdns__outpacket.html">mdns_outpacket</a> *&#160;</td>
          <td class="paramname"><em>outpkt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Write domain to outpacket. Compression will be attempted, unless domain-&gt;skip_compression is set. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">outpkt</td><td>The outpacket to write to </td></tr>
    <tr><td class="paramname">domain</td><td>The domain name to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK on success, an err_t otherwise </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_4e6b3cf33a61b6caac9c8ac30c866f37.html">lwip</a></li><li class="navelem"><a class="el" href="dir_f9284811ac594eafdc3134d5f8b945cb.html">apps</a></li><li class="navelem"><a class="el" href="mdns__domain_8h.html">mdns_domain.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
